
#include "rclcpp/rclcpp.hpp"
#include "fake_laser/FakeLaser.h"

int main(int argc, char** argv)
{
    try {
        rclcpp::init(argc, argv);
        auto node = std::make_shared<FakeLaser>();
    
        if (!node->init()) {
            throw std::runtime_error("Failed to initialize FakeLaser node");
        }

        RCLCPP_INFO(node->get_logger(), "Starting FakeLaser node");

        rclcpp::spin(node);
        rclcpp::shutdown();
        return 0;
      }
      catch (const std::exception& e) {
        std::cerr << "Exception in main: " << e.what() << std::endl;
        return 1;
      }
}